﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YuanLiaoYanShou.aspx.cs" Inherits="Catering.Catering_Page.richang.YuanLiaoYanShou" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>培训应急</title>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Scripts/zhezhao.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/My97DatePicker/WdatePicker.js"></script>
    <link href="../../Style/center.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/sysData.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/zhezhao.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(document).ready(function () {
            $("input[name='rbm_shifoushangcai']").attr("disabled", "disabled");
            $("input[name='rbm_yuanliaoshifouhege']").attr("disabled", "disabled");
            $("input[name='rbm_zhuguanglingdaohuibao']").attr("disabled", "disabled");

            $("input[name='rbm_ylys']").change(function () {
                var _thisval = $(this).val();
                var isYuanLiaoYanShou = "";
                if (_thisval == "是") {
                    isYuanLiaoYanShou = "true";

                    $("input[name='rbm_shifoushangcai']").removeAttr("disabled");
                    $("input[name='rbm_yuanliaoshifouhege']").removeAttr("disabled");
                    $("input[name='rbm_zhuguanglingdaohuibao']").removeAttr("disabled");
                } else if (_thisval == "否") {
                    isYuanLiaoYanShou = "false";
                    $("input[name='rbm_shifoushangcai']").attr("disabled", "disabled");
                    $("input[name='rbm_yuanliaoshifouhege']").attr("disabled", "disabled");
                    $("input[name='rbm_zhuguanglingdaohuibao']").attr("disabled", "disabled");
                }

                if (isYuanLiaoYanShou != "") {
                    var hdn_useDate = $("#hdn_useDate").val();
                    var hdn_currentClassID = $("#hdn_currentClassID").val();
                    var hdn_currentGroppID = $("#hdn_currentGroppID").val();

                    var _ribaobianhao = hdn_useDate + "," + hdn_currentClassID + "," + hdn_currentGroppID + ",";

                    $.ajax({
                        type: "Post",
                        url: "YuanLiaoYanShou.aspx/YLYS",
                        data: "{'isYuanLiaoYanShou':'" + isYuanLiaoYanShou + "','ribaobianhao':'" + _ribaobianhao + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            if (data.d == "ok") {
                            }
                        }
                    });
                }
            });

            $("input[name='rbm_shifoushangcai']").change(function () {
                var _thisval = $(this).val();
                var shangcai = "";
                if (_thisval == "是") {
                    shangcai = "true";

                    $("input[name='rbm_yuanliaoshifouhege']").removeAttr("disabled");
                    $("input[name='rbm_zhuguanglingdaohuibao']").removeAttr("disabled");
                } else if (_thisval == "否") {
                    shangcai = "false";
                    $("input[name='rbm_yuanliaoshifouhege']").attr("disabled", "disabled");
                    $("input[name='rbm_zhuguanglingdaohuibao']").attr("disabled", "disabled");
                }

                if (shangcai != "") {
                    var hdn_useDate = $("#hdn_useDate").val();
                    var hdn_currentClassID = $("#hdn_currentClassID").val();
                    var hdn_currentGroppID = $("#hdn_currentGroppID").val();

                    var _ribaobianhao = hdn_useDate + "," + hdn_currentClassID + "," + hdn_currentGroppID + ",";

                    $.ajax({
                        type: "Post",
                        url: "YuanLiaoYanShou.aspx/SSSC",
                        data: "{'shangcai':'" + shangcai + "','ribaobianhao':'" + _ribaobianhao + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            if (data.d == "ok") {
                            }
                        }
                    });
                }
            });

            $("input[name='rbm_yuanliaoshifouhege']").change(function () {
                var _thisval = $(this).val();
                var hege = "";
                if (_thisval == "是") {
                    hege = "true";

                    $("input[name='rbm_zhuguanglingdaohuibao']").removeAttr("disabled");
                } else if (_thisval == "否") {
                    hege = "false";
                    $("input[name='rbm_zhuguanglingdaohuibao']").attr("disabled", "disabled");
                }

                if (hege != "") {
                    var hdn_useDate = $("#hdn_useDate").val();
                    var hdn_currentClassID = $("#hdn_currentClassID").val();
                    var hdn_currentGroppID = $("#hdn_currentGroppID").val();

                    var _ribaobianhao = hdn_useDate + "," + hdn_currentClassID + "," + hdn_currentGroppID + ",";

                    $.ajax({
                        type: "Post",
                        url: "YuanLiaoYanShou.aspx/hg",
                        data: "{'hege':'" + hege + "','ribaobianhao':'" + _ribaobianhao + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            if (data.d == "ok") {
                            }
                        }
                    });
                }
            });

            $("input[name='rbm_zhuguanglingdaohuibao']").change(function () {
                var _thisval = $(this).val();
                var lingdao = "";
                if (_thisval == "是") {
                    lingdao = "true";
                } else if (_thisval == "否") {
                    lingdao = "false";
                }

                if (lingdao != "") {
                    var hdn_useDate = $("#hdn_useDate").val();
                    var hdn_currentClassID = $("#hdn_currentClassID").val();
                    var hdn_currentGroppID = $("#hdn_currentGroppID").val();

                    var _ribaobianhao = hdn_useDate + "," + hdn_currentClassID + "," + hdn_currentGroppID + ",";

                    $.ajax({
                        type: "Post",
                        url: "YuanLiaoYanShou.aspx/hg",
                        data: "{'lingdao':'" + lingdao + "','ribaobianhao':'" + _ribaobianhao + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            if (data.d == "ok") {
                            }
                        }
                    });
                }
            });

            var hdn_useDate = $("#hdn_useDate").val();
            var hdn_currentClassID = $("#hdn_currentClassID").val();
            var hdn_currentGroppID = $("#hdn_currentGroppID").val();

            var _ribaobianhao = hdn_useDate + "," + hdn_currentClassID + "," + hdn_currentGroppID + ",";
            $.ajax({
                type: "Post",
                url: "YuanLiaoYanShou.aspx/Get",
                data: "{'_rbid':'" + _ribaobianhao + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d[3] == true) {
                        $("#rbm_ylysT").attr("checked","checked");
                        if (data.d[2] == true) {
                            $("#rbm_shifoushangcaiT").attr("checked", "checked");
                            if (data.d[0] == true) {
                                $("#rbm_yuanliaoshifouhegeT").attr("checked", "checked");
                                if (data.d[1] == true) {
                                    $("#rbm_zhuguanglingdaohuibaoT").attr("checked", "checked");
                                }
                            }
                        }
                    }
                }
            });
        });
    </script>
</head>
<body style="background-color: #E5F1FD">
    <input type="hidden" id="HidID" />
    <form runat="server">
        <%
            string useDate = null;
            string currentClassID = null;
            string currentGroppID = null;
            if (Session["useDate"] != null)
                useDate = Session["useDate"].ToString();
            if (Session["ClassID"] != null)
                currentClassID = Session["ClassID"].ToString();
            if (Session["GroppID"] != null)
                currentGroppID = Session["GroppID"].ToString();
        %>
        <input type="hidden" id="hdn_useDate" value='<%=useDate%>' />
        <input type="hidden" id="hdn_currentClassID" value='<%=currentClassID%>' />
        <input type="hidden" id="hdn_currentGroppID" value='<%=currentGroppID%>' />
        <table width="500" height="200">
        <tr>
            <td align="right" width="150">原料验收汇报：
            </td>
            <td>
                <input type="radio" name="rbm_ylys" id="rbm_ylysT" value="是" />是
	            <input type="radio" name="rbm_ylys" id="rbm_ylysF" value="否" checked="checked" />否
            </td>
        </tr>
        <tr id="tr_shifoushangcai">
            <td align="right" width="150">（*）是否上菜：
            </td>
            <td>
                <input type="radio" name="rbm_shifoushangcai" id="rbm_shifoushangcaiT" value="是"  />是
	            <input type="radio" name="rbm_shifoushangcai" id="rbm_shifoushangcaiF" value="否" checked="checked"/>否
            </td>
        </tr>
        <tr id="tr_yuanliaoshifouhege">
            <td align="right" width="150">原料是否合格：
            </td>
            <td>
                <input type="radio" name="rbm_yuanliaoshifouhege" id="rbm_yuanliaoshifouhegeT" value="是" />是
	            <input type="radio" name="rbm_yuanliaoshifouhege" id="rbm_yuanliaoshifouhegeF" value="否" checked="checked"/>否
            </td>
        </tr>
        <tr id="tr_zhuguanlingdaohuibao">
            <td align="right" width="150">是否与主管领导汇报：
            </td>
            <td>
                <input type="radio" name="rbm_zhuguanglingdaohuibao" id="rbm_zhuguanglingdaohuibaoT" value="是"  />是
	            <input type="radio" name="rbm_zhuguanglingdaohuibao" id="rbm_zhuguanglingdaohuibaoF" value="否" checked="checked" />否
            </td>
        </tr>
    </table>
    </form>
    
</body>
</html>

